import 'package:flutter/material.dart';

void main() {
  runApp(const MaterialApp(home: Main()));
}

class Main extends StatefulWidget {
  const Main({super.key});

  @override
  _MainState createState() => _MainState();
}

class _MainState extends State<Main> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'Image 组件-网络图',
          textAlign: TextAlign.center,
          style: TextStyle(color: Colors.red),
        ),
        centerTitle: true,
        backgroundColor: Colors.lightGreenAccent,
      ),
      body: Center(
        child: Container(
          width: 300,
          height: 300,
          color: Colors.blueAccent,
          child: Image.asset(
            'qiche.png',
            fit: BoxFit.fill,
          ),
        ),
      ),
    );
  }
}
